fix(ci): commit Cargo.lock for reproducible builds#1123
Merged
Conversation
The dependency was bumped from 0.2.14 to 0.2.15 but the cargo-vet exemption was not updated, causing the supply chain audit to fail.
Cargo.lock was gitignored and CI generated a fresh lockfile each run. This caused cargo-vet failures when upstream crates published new versions between PR CI and post-merge CI on main. - Remove Cargo.lock from .gitignore - Commit Cargo.lock to pin exact dependency versions - Remove generate-lockfile step from CI audit job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cargo.lockfrom.gitignoreand commit it to the repocargo generate-lockfilestep from CI audit jobRoot cause:
Cargo.lockwas gitignored, so CI generated a fresh lockfile each run viacargo generate-lockfile. Whenpython3-dll-a0.2.15 was published to crates.io, the fresh resolve picked it up but the cargo-vet exemption still listed 0.2.14 — breaking main without any code change.Fix: Committing
Cargo.lockpins exact versions. Dependency bumps become explicit (cargo update) and show up in diffs, so cargo-vet exemptions can be updated in the same PR.Test plan
cargo vet --lockedpasses locallygenerate-lockfilestep